﻿// Copyright (c) Vitaly Kamiansky. All rights reserved. 
// See License.txt in the project root.

using Property.Objects;
using System;
using System.Collections.Generic;
using System.Windows.Input;

namespace Property.Windows
{
    /// <summary>
    /// Contains words that extend the description 
    /// of a property's reload process.
    /// </summary>
    public static class ReloaderPrototypeExtensionsWindows
    {
        /// <summary>
        /// <para>... the user sets the property's Input.</para>
        /// <para>A new property value will be read from Input.</para>
        /// <para>( i ) INotifyDataErrorInfo will be used to validate the property.</para>
        /// </summary>
        /// <param name="validate">Tell me what messages to show
        /// for a given value.</param>
        public static IValidationInputPropertyPrototype<T> ValidationInput<T>(this IReloaderPrototype<T> source, Func<T, IEnumerable<string>> validate)
        {
            return new ValidationInputPropertyPrototype<T>(source, validate);
        }
    }
}
